package com.ruoyi.common.enums;


/**
 * 用户状态
 *
 * @author ruoyi
 */
public enum TypeEnums {
    // 首页-1-综合；2-新发布；3-价格；4-人气；5-图文任务
    HOME1(1, 1, "首页-1-综合"),
    HOME2(2, 1, "首页-新发布"),
    HOME3(3, 1, "首页-价格"),
    HOME4(4, 1, "首页-人气"),

    LOBBY1(5, 2, "大厅-最新"),
    LOBBY2(6, 2, "大厅-最热"),
    LOBBY3(7, 2, "大厅-高佣"),
    LOBBY4(8, 2, "大厅-快速"),
    LOBBY5(9, 2, "大厅-结算快"),
    ;

    private final Integer type;
    private final Integer typeLevel;
    private final String code;

    TypeEnums(int type, int typeLevel, String code) {
        this.type = type;
        this.typeLevel = typeLevel;
        this.code = code;
    }

    public Integer getType(){
        return type;
    }
    public Integer getTypeLevel(){
        return typeLevel;
    }
    public static TypeEnums checkHaveEnums(Integer type, Integer typeLevel){
        for (TypeEnums value : values()) {
            if (value.typeLevel.equals(typeLevel)&&value.type.equals(type)){
                return value;
            }
        }
        return null;
    }
}
